<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="/WEB-INF/tld/app.tld" %>
<%@ taglib prefix="ct" uri="/WEB-INF/tld/commonTag.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<%@ include file="/WEB-INF/jsp/common/common_header.jsp" %>
<%@ include file="/WEB-INF/jsp/common/common.jsp" %>


<script language="javascript">
    

	function funcDetail(transDate,cardComCd) {
		width = 960;
		height = 800;
		var user_id = $("#user_id").val();
	    x = (screen.width) ? (screen.width-width)/2 : 0;
	    y = (screen.height) ? (screen.height-height)/2 : 0;
	    var popUrl = 'popCardWithDrawDetailInfo.do?transDate='+transDate+'&cardComCd='+cardComCd+'&user_id='+user_id;
	    var win =window.open(popUrl,'popCardWithDrawDetailInfo', 'left=' + x + ',top=' + y + ',width=' + width + ',height=' + height + ',scrollbars=yes,status=no,menubar=no');
	    win.focus();
	}


	
    // 검색 버튼 클릭
    function funcSearch() {
      	
        var searchStRegDt = document.getElementById('searchStRegDt').value.replace(/-/gi,"");
        var searchEdRegDt = document.getElementById('searchEdRegDt').value.replace(/-/gi,"");

        if(searchStRegDt > searchEdRegDt){ 
            alert("등록일의 시작일이 종료일보다 큽니다.");
            return false;
        }
        
        var fm  = document.form;
        fm.action = 'popCardFeeDetailInfo.do';
        fm.submit();
    }
    
    // 엑셀다운
    function funcExcel(excelType){
        $("#excelType").val(excelType);
        document.form.action = 'findShoppingSpcExcel.omp';
        document.form.submit(); 
    }
    //////////////////////////////////
    //jQuery datepicker Form set
    ///////////////////////////////// 
    $(function() {
        $("#searchStRegDt").koreadate();
        $("#searchEdRegDt").koreadate();
    });    

        
    </script>
</head>
<body>
<div class="con_area" style="width: 780px">
<form id="form" name="form" action="" >
<input type="hidden" id="user_id" name="user_id" value="${model.user_id}"/>
<br>
<br>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
        <td align="left"><h2 class="tit">서비스수수료 상세조회 </h2></td>
        
    </tr>
</table>
    <div style="margin-top:7px"/>
        <table cellpadding="0" cellspacing="0" border="0" class="data_table_01">
            <tr>
                <td class="data_01" style='width:140px; text-align:right;'>&nbsp;발생일</td>
                <td class="data_02">
                    <input type='text' id="searchStRegDt" name="searchStRegDt" value="${model.searchStRegDt}" title="YYYY-MM-DD" style="width: 100px;" maxlength="10" readonly/>
                    ~
                    <input type='text' id="searchEdRegDt" name="searchEdRegDt" value="${model.searchEdRegDt}" title="YYYY-MM-DD" style="width: 100px;" maxlength="10" readonly/>
                     &nbsp;
                    <input type='button' class='button_63_01' value='검색' onclick='funcSearch();'>
                    <input type="button" class="button_80" value="최근 1주일" onclick="setOrderSearchDateAdminPoC('7day',form.searchStRegDt, form.searchEdRegDt);" />
                    <input type="button" class="button_80" value="최근 1개월" onclick="setOrderSearchDateAdminPoC('1month',form.searchStRegDt, form.searchEdRegDt);" />
                    <input type="button" class="button_80" value="최근 3개월" onclick="setOrderSearchDateAdminPoC('3month',form.searchStRegDt, form.searchEdRegDt);" />
                </td>
            </tr>  
        </table>
<br>
    
    <table cellpadding="0" cellspacing="1" border="0" class="data_table_02" style="width:100%;" >
    <colgroup>
        <col width="17%" />
        <col width="17%" />
        <col width="17%" />
        <col width="16%" />
        <col width="16%" />
        <col width="17%" />

    </colgroup>
    <thead>
        <tr>
            <th>발생일</th>
            <th>납부일</th>
            <th>대출잔액</th>
            <th>수수료율</th>
            <th>부가세율</th>
            <th>수수료</th>
        </tr>
    </thead>
    <tbody>
<c:if test='${empty cardFeeDetailInfo}'>    
    <tr>
        <td colspan="6">
            <span style="padding-top:3px;*padding-top:2px;"><strong>조회된 데이터가 존재하지 않습니다.</strong></span>
        </td>
    </tr>
</c:if>
<c:if test='${not empty cardFeeDetailInfo}'>
	<c:forEach var="vo" items="${cardFeeDetailInfo}">
	    <tr	onMouseOver="this.style.background='#FFF9E1'" onMouseOut="this.style.background='#FFFFFF'" >
	        <td style="text-align:center;">${vo.transDate}
	        </td>
	        <td style="text-align:center;">${vo.transDate}
	        </td>
	        <td style="text-align:center;"><fmt:formatNumber value="${vo.totalProdAmt}" pattern="#,###" />
	        </td>
	        <td style="text-align:center;">${vo.merchantFee}
	        </td>
	        <td style="text-align:center;">${vo.checkFee}
	        </td>
	        <td style="text-align:center;"><fmt:formatNumber value="${vo.payProdFee}" pattern="#,###" />
	        </td>
	    </tr>
    </c:forEach>
</c:if>
    </tbody>
    </table>
    <br>

</form>
</div>
</body>

